import { stringify } from 'qs';
import {request} from '../utils/request';
import { getConfig } from '../../config';
const config = getConfig();

//  稽查信息列表--------------------------------------------------------------------
export async function queryInspectionList(params) {
  return request('/inspect/inspecinfo/list', {
    method: 'POST',
    body: params,
  });
}


// 添加
export async function actionInspectionAdd(params) {
  return request('/inspect/inspecinfo/save', {
    method: 'POST',
    body: params,
  });
}

// 编辑
export async function actionInspectionEdit(params) {
  return request('/inspect/inspecinfo/update', {
    method: 'POST',
    body: params,
  });
}



// 详情
export async function queryInspectionInfo(params) {
  if (config.isMock) {
    return request(`/inspect/inspecinfo/info`, {
      method: 'POST',
      body: params,
    });
  }else{
    return request(`/inspect/inspecinfo/info/${params.inspectId}`, {
      method: 'POST',
    });
  }
}

// 导出
export async function actionInspectionExport(params) {
  return request(
    "11010006",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}

// 稽查处理过程
export async function queryInspectionProcess(params) {
  return request('/inspect/inspecprocess/queryProcessListByInspectId', {
    method: 'POST',
    body: params,
  });
}

// 审核
export async function queryInspectionExamine(params) {
  return request('/inspect/inspecinfo/check', {
    method: 'POST',
    body: params,
  });
}



// 审核状态改变为审核中
export async function actionInspectionStatusExamine(params) {
  return request('/inspect/inspecinfo/inspecinfoChecking', {
    method: 'POST',
    body: params,
  });
}
